<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>本地网页</title>
		<style type="text/css">
			html, body {
				width: 100%;
				height: 100%;
				margin: 0;
				padding: 0;
				background-color: rgba(0,0,0,0);
				overflow: hidden;
			}
			#demoCanvas {
				width: 100%;
				height: 100%;
			}
		</style>
	</head>
	<body>
		<div id="demoCanvas"></div>
		<script type="text/javascript" src="https://js.cdn.aliyun.dcloud.net.cn/dev/uni-app/uni.webview.1.5.2.js"></script>
		<script src="js/svga.min.js"></script>
		<script type="text/javascript">
			document.addEventListener('UniAppJSBridgeReady', function() {
				var svga = plus.webview.currentWebview();
				var player = new SVGA.Player('#demoCanvas');
				var parser = new SVGA.Parser('#demoCanvas');
				parser.load(svga.url, function(videoItem) {
					player.loops = 1;
					player.setVideoItem(videoItem);
					player.startAnimation();
					player.onFinished(function () {
						plus.webview.close(svga);
					});
				})
			});
		</script>
	</body>
</html>
